package com.tem.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tem.common.core.domain.SysRoleDataScope;
import com.tem.common.core.domain.SysSearchPage;
import com.tem.system.entity.SysUserEntity;
import com.tem.system.entity.SysUserRoleEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @author 腾木科技 Created by 2022/1/7 17:23
 */
public interface SysUserMapper extends BaseMapper<SysUserEntity> {

    public IPage<SysUserEntity> pageSearch(@Param("page") Page<SysUserEntity> page,@Param("request") SysSearchPage request);
    public IPage<SysUserEntity> pageSearchNoFilter(@Param("page") Page<SysUserEntity> page,@Param("request") SysSearchPage request);
    void saveOperatorRole(SysUserRoleEntity request);

    void deleteOperatorRoleByUserId(String userId);

    void updateOperatorRoleByUserId(@Param("userId") Long userId,@Param("roleId") Long roleId);

    void deleteBath(@Param("array") long[] ids);

    void deleteBathOperatorRole(@Param("array") long[] ids);

    void removeOperatorRoleByUserId(Long id);

    List<Long> selectOperatorAndRoleById(Long id);

    List<SysRoleDataScope> selectRoleDataScopeList(@Param("id")Long id,@Param("sysBranchOfficeId") Long sysBranchOfficeId);
}
